<%--
  Created by IntelliJ IDEA.
  User: yangyaru
  Date: 2022/4/11
  Time: 11:32
  To change this template use File | Settings | File Templates.
--%>
<%@ page contentType="text/html;charset=UTF-8" language="java" %>
<%@ taglib prefix="c" uri="http://java.sun.com/jsp/jstl/core"%>
<!DOCTYPE html>
<html lang="en">
<head>
    <meta charset="UTF-8">
    <title>文档管理</title>
</head>
<style>
    table, th, td {
        border: solid 1px #efefef;
    }
    table {
        width: 100%;
        margin: auto;
        border-collapse: collapse;
        text-align: center;
        border-radius: 6px;
    }
    td,th{
        padding: 10px;
    }
    a {
        text-decoration-line: none;
        color: green;
    }
    a:hover {
        color: brown;
        text-decoration-line: underline;
    }
    tr:first-child {
        background-color: #efefef;
        border-radius: 4px 4px 0 0;
        border-bottom: solid 1px #ddd;
    }
    table caption {
        font-size: 1.5rem;
        font-weight: bolder;
        margin-bottom: 20px;
    }
    p {
        text-align: center;
    }
    /*首页样式*/
    p a:first-child {
        width: 56px;
    }
    p a:last-child {
        width: 56px;
    }
    p a {
        display: inline-block;
        width: 28px;
        height: 24px;
        border: 1px solid green;
        margin-left:2px;
        line-height: 24px;
    }
    /*当前页样式*/
    .active {
        background-color: green;
        color: white;
    }
    .more {
        border: none;
    }
</style>
<body>
<h3>当前位置：新闻分类 <a href="/admin/news_class/add">增加内容</a></h3>

<table class="table table-hover text-center">
    <tbody>
    <tr>
        <th width="15%">序号</th>
        <th width="25%">名称</th>
        <th width="30%">图片</th>
        <th width="30%">操作</th>

    </tr>
    <c:forEach items="${newsClasses}" var="newsClass">
        <tr>
            <td>${newsClass.id}</td>

            <td>${newsClass.name}</td>
            <td><img src="${newsClass.img} " width="250px"></td>

            <td>
                <a href="/admin/news_class/update?id=${newsClass.id}">编辑</a>
                <a href="/admin/news_class/delete?id=${newsClass.id}">删除</a>
            </td>

        </tr>
    </c:forEach>


    </tbody>
</table>



</body>
</html>